//---------------------------------------------------------------------------

#ifndef h_gH
#define h_gH
//---------------------------------------------------------------------------
class HStage;
namespace h_g
{
   extern bool InitFail;
   extern UINT ClipboardFormat;
   extern UTF8String BaseDir;
   extern UTF8String BinDir;
   extern UTF8String RecentOpenDir;
   extern UTF8String FirstJobFileName;
   extern bool Copyright;
   extern bool ExcelFlag;
   extern bool DebugFlag;
   extern vector<string> SpecialDateList;
   extern vector<string> BusinessTypeList;
   extern LCID LocaleID;
   extern UTF8String ClientCodeSet;
   extern const char *JobNameDelimiter;
   extern UTF8String ServerIpAddr;
   extern UTF8String ServerProtocol;
   extern int ServerPort;
   extern Graphics::TBitmap *Background;
   extern Graphics::TBitmap *CustLogo;
   extern Graphics::TBitmap *Logo;
   extern bool CustLogoFlag;
   extern bool DirectLink;
   extern TColor IconSelectedColor;
   extern TColor IconRunningColor;
   extern TColor IconSuccessColor;
   extern TColor IconFailedColor;
   extern TColor IconSkippedColor;
   extern TColor IconUnknownColor;
   extern TColor LineColor;
   extern TColor LineShadowColor;
   extern TColor TextColor;
   extern TColor TabTextColor;
   extern vector<TColor> IconTextColors;

   extern Variant ExcelApp;

   extern vector<Graphics::TBitmap*> BitmapArrow;
   extern vector<Graphics::TBitmap*> BitmapConnector;

   extern vector<Graphics::TBitmap*> BitmapBatchBg1;
   extern vector<Graphics::TBitmap*> BitmapBatchBg2;
   extern vector<Graphics::TBitmap*> BitmapBatchBg3;
   extern vector<Graphics::TBitmap*> BitmapJobBg1;
   extern vector<Graphics::TBitmap*> BitmapJobBg2;
   extern vector<Graphics::TBitmap*> BitmapJobBg3;
   extern vector<Graphics::TBitmap*> BitmapExternJobBg1;
   extern vector<Graphics::TBitmap*> BitmapExternJobBg2;
   extern vector<Graphics::TBitmap*> BitmapExternJobBg3;
   extern vector<Graphics::TBitmap*> BitmapGroupBg1;
   extern vector<Graphics::TBitmap*> BitmapGroupBg2;
   extern vector<Graphics::TBitmap*> BitmapGroupBg3;
   extern vector<Graphics::TBitmap*> BitmapFwBg;
   extern vector<Graphics::TBitmap*> BitmapTimeBg;

   enum HIconType { itNormal, itSelected, itRunning, itSuccess,
      itFailed, itSkipped, itUnknown };
   enum HArrowDir { adDown, adRight, adUp, adLeft };

   void __fastcall Init();
   void __fastcall Close();
   void __fastcall RegisterStage(const UTF8String &Type, HStage *Prototype);
   HStage * __fastcall CloneStage(const UTF8String &Type);
   void __fastcall AddRecentJobPath(const UTF8String &Path);
   bool __fastcall LoadSbt(HXmlTree &Xml, const UTF8String &FileName,
      UTF8String &ErrStr, bool &ChangeFlag, bool &XmlPropertyFlag);
   void __fastcall ChangeSkin(const UTF8String &Skin);
   void WriteLog(const char *FormatStr, ...);
};

#endif
